package com.helei.consumerListener;

import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "asyn-topic-boot", consumerGroup = "group-asyn")
public class ConsumerAsynListenerRocketMq implements RocketMQListener<MessageExt> {
    @Override
    public void onMessage(MessageExt messageExt) {
        System.out.println("接收到了消息2:" + new String(messageExt.getBody()));
    }
}
